/*
 * @Description: 评论数据初始化
 * @Autor: HuiSir<273250950@qq.com>
 * @Date: 2024-05-28 16:34:56
 * @LastEditTime: 2024-06-24 16:30:57
 */
import { getCommentConfig, getComments } from "../api/comment.js";

export const doGetComments = (postId, pageNum) => {
  return getComments({
    postId,
    pageNum,
  })
}

export const getCommentInfo = async (postId, currPage) => {
  const commentConfig = await getCommentConfig(postId);
  const commentsRes = await doGetComments(postId, currPage)

  return {
    commentConfig,
    commentsRes
  }
}

